<?php

namespace app\store\model;

use app\admin\model\Admin;
use think\Model;
use think\model\concern\SoftDelete;

class Store extends Model
{   
    use SoftDelete;

    protected $deleteTime = 'delete_time';

    protected $schema = [
        'id' => 'int',
        'store_name' => 'string',
        'store_logo' => 'string',
        'id_number' => 'string',
        'legal_person' => 'string',
        'id_card_front' => 'string',
        'id_card_reverse' => 'string',
        'business_license' => 'string',
        'company_name' => 'string',
        'company_address' => 'string',
        'legal_phone' => 'string',
        'status' => 'int',
        'create_time' => 'timestamp',
        'update_time' => 'timestamp',
        'delete_time' => 'timestamp',
    ];

    protected $readonly = ['store_name'];

    
    public function admin()
    {
        return $this->hasMany(Admin::class);
    }

}